﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model.Course;
using Model.User;

public partial class ViewCourseUnlogged : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["CourseId"] == null) return;

        Course c = Course.get(Convert.ToInt32(Session["CourseId"]));

        if (c != null)
        {
            courseNameLabel.Text = c.getName();
            courseNameLabel.Font.Size = FontUnit.Parse("1.5em");
            lecturerLabel.Text = "Prowadzący: " + c.getLecturer().getFirstName() + " " + c.getLecturer().getLastName();
            description.InnerHtml = c.getDescription();
        }

        Session["CourseId"] = null;
    }
}